import 'package:gold/generated/json/base/json_field.dart';
import 'package:gold/generated/json/pool_model.g.dart';
import 'dart:convert';
export 'package:gold/generated/json/pool_model.g.dart';

@JsonSerializable()
class PoolModel {
	/// 奖池计划ID
	int? id;
	@JSONField(name: 'pool_id')
	int? poolId;
	/// 开始时间
	@JSONField(name: 'start_time')
	String? startTime;
	/// 结束时间
	@JSONField(name: 'end_time')
	String? endTime;
	/// 活动名
	String? name;
	/// 当前奖池金额
	@JSONField(name: 'total_amount')
	double? totalAmount;
	/// 目标金额
	@JSONField(name: 'target_amount')
	double? targetAmount;
	/// 类型：''day'',=日''week''=周,''month''=月,''year''=年'
	String? type;
	/// 最后一名均分人数（0为不限制人数）
	@JSONField(name: 'last_count')
	int? lastCount;
	/// 奖池最后一名均分:0=否,1=是
	@JSONField(name: 'last_average')
	String? lastAverage;
	/// 开奖比例（%），按名次用户英文逗号隔开
	String? rate;
	/// 创建时间
	@JSONField(name: 'created_at')
	String? createdAt;
	/// 更新时间
	@JSONField(name: 'updated_at')
	String? updatedAt;

	PoolModel();

	factory PoolModel.fromJson(Map<String, dynamic> json) => $PoolModelFromJson(json);

	Map<String, dynamic> toJson() => $PoolModelToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}